﻿<Window x:Class="Drawing.TileFlip"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Tiles" Height="353.6" Width="552"
    >
  <!-- Overlay labels by putting one UniformGrid on top of another. -->
  <Grid>
  <UniformGrid>
    <Rectangle Stroke="Black">
      <Rectangle.Fill>
        <ImageBrush ImageSource="tile.jpg" TileMode="Tile" 
                    ViewportUnits="Absolute" Viewport="0 0 37 37"></ImageBrush>
      </Rectangle.Fill>
    </Rectangle>
    <Rectangle Stroke="Black">
      <Rectangle.Fill>
        <ImageBrush ImageSource="tile.jpg" TileMode="FlipX"
                    ViewportUnits="Absolute" Viewport="0 0 37 37"></ImageBrush>
      </Rectangle.Fill>
    </Rectangle>
    <Rectangle Stroke="Black">
      <Rectangle.Fill>
        <ImageBrush ImageSource="tile.jpg" TileMode="FlipY"
                    ViewportUnits="Absolute" Viewport="0 0 37 37"></ImageBrush>
      </Rectangle.Fill>
    </Rectangle>
    <Rectangle Stroke="Black">
      <Rectangle.Fill>
        <ImageBrush ImageSource="tile.jpg" TileMode="FlipXY"
                    ViewportUnits="Absolute" Viewport="0 0 37 37"></ImageBrush>
      </Rectangle.Fill>
    </Rectangle>
  </UniformGrid>
    <UniformGrid>
      <UniformGrid.Resources>
        <Style TargetType="{x:Type TextBlock}">
          <Setter Property="HorizontalAlignment" Value="Center"></Setter>
          <Setter Property="VerticalAlignment" Value="Bottom"></Setter>
          <Setter Property="FontSize" Value="25"></Setter>
          <Setter Property="FontWeight" Value="Bold"></Setter>
          <Setter Property="Margin" Value="3"></Setter>
        </Style>
      </UniformGrid.Resources>
      <TextBlock>Tile</TextBlock>
      <TextBlock>FlipX</TextBlock>
      <TextBlock>FlipY</TextBlock>
      <TextBlock>FlipXY</TextBlock>
    </UniformGrid>
  </Grid>
</Window>
